/**
 * @author harry
 * @date 2022/3/2/12:01
 */

package com.serviceOrchestration.dao;

import com.serviceOrchestration.pojo.Product;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductDao {
    List<Product> selectAllProducts();

    Integer insert(Product product);

    List<Product> selectProductById(String id);

    Integer updateProperties(@Param("p") Product product);

    Integer updateServices(String productId, String serviceJson);

    Integer decreaseSurplus(String id);

    Integer updateStatus(String id, boolean available);
}
